package com.cupdata.zicon.decorator;

import java.io.UnsupportedEncodingException;

/**
 * 装饰类
 */
public class Decorator implements Component{
    private Component component;
    public Decorator(Component component){
        this.component = component;
    }

    @Override
    public void operation() {
        component.operation();
    }

    @Override
    public String getParam(String str) {
        try {
            str=new String(str.getBytes("ISO8859-1"),"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return str;
    }
}
